package com.bootdo.mall.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.bootdo.common.annotation.NotColumn;
import com.bootdo.common.fansheutils.FansheUtils;
import com.bootdo.common.fansheutils.JibenLei;
import com.bootdo.lvyou.domain.LvyouCity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.haojiangbo.annotation.HapiFeild;


/**
 * 
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-24 18:51:09
 */
 @JsonInclude(JsonInclude.Include.NON_NULL)
public class MallCateGory extends JibenLei {
	@NotColumn
	private static final long serialVersionUID = 1L;
	
	
	//id
	 @NotColumn 	@HapiFeild("id")
	private Integer id;
	
	//名称
		@HapiFeild("名称")
	private String name;
	
	//排序
		@HapiFeild("排序")
	private Integer paixu;
	
	//创建时间
		@HapiFeild("创建时间")
	private Date createTime;
	
	//用户id
		@HapiFeild("用户id")
	private Long userId;
	
	//用户名称
		@HapiFeild("用户名称")
	private String userName;


		//标签
	private String lables;
		//图片
	private String pic;


	private Integer isShowIndex;

	//父类ID
		@HapiFeild("父类ID")
	private Integer parentId;
	@NotColumn
	private List<MallCateGory> children = new ArrayList<>();
	@NotColumn
	private Boolean hasChildren = false;

	@NotColumn
	private List<MallGood> goodList  = new ArrayList<>();



	private Integer level;

    public MallCateGory(){
    	this.isShowIndex = 0;
    	this.pic = "";
    	this.level = 1;
    	this.createTime = new Date();
    }

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getIsShowIndex() {
		return isShowIndex;
	}

	public void setIsShowIndex(Integer isShowIndex) {
		this.isShowIndex = isShowIndex;
	}

	public String getLables() {
		return lables;
	}

	public void setLables(String lables) {
		this.lables = lables;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public List<MallGood> getGoodList() {
		return goodList;
	}

	public void setGoodList(List<MallGood> goodList) {
		this.goodList = goodList;
	}

	public List<MallCateGory> getChildren() {
		return children;
	}

	public void setChildren(List<MallCateGory> children) {
		this.children = children;
	}

	public Boolean getHasChildren() {
		return hasChildren;
	}

	public void setHasChildren(Boolean hasChildren) {
		this.hasChildren = hasChildren;
	}

	/**
	 * 设置：id
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：id
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：名称
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 获取：名称
	 */
	public String getName() {
		return name;
	}
	/**
	 * 设置：排序
	 */
	public void setPaixu(Integer paixu) {
		this.paixu = paixu;
	}
	/**
	 * 获取：排序
	 */
	public Integer getPaixu() {
		return paixu;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：用户id
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	/**
	 * 获取：用户id
	 */
	public Long getUserId() {
		return userId;
	}
	/**
	 * 设置：用户名称
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * 获取：用户名称
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * 设置：父类ID
	 */
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	/**
	 * 获取：父类ID
	 */
	public Integer getParentId() {
		return parentId;
	}


	@Override
	@JsonIgnore
	public List<HashMap<String, Object>> getFields() {
		// TODO Auto-generated method stub
		return FansheUtils.getFieldList(this);
	}


}
